# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-responses
pkgver=0.23.1
pkgrel=3
pkgdesc='A utility library for mocking out the `requests` Python library.'
arch=('any')
license=('Apache')
url='https://github.com/getsentry/responses'
depends=('python-requests' 'python-urllib3' 'python-yaml')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-pytest-httpserver' 'python-tomli'
              'python-tomli-w')
source=("https://github.com/getsentry/responses/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('589bb2b6e5f259ec56ae8e4575f9c7dbfc915cf5ed622c9cb48492f34e13035164daea3806c7393533217237dbabf99e436754e9944f518bbfc5658391cc2e84')

prepare() {
  cd responses-$pkgver
  sed -i '/types-PyYAML/d' setup.py
}

build() {
  cd responses-$pkgver
  python setup.py build
}

check() {
  cd responses-$pkgver
  pytest
}

package() {
  cd responses-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
